<template>
	<view class="content">
		<rich-text class="richtext" :nodes="contentNodes" style="font-size: 14px;"></rich-text>
	</view>
</template>

<script>
	import {
		word
	} from '@/common/js/index.js'
	export default {
		data() {
			return {
				contentNodes: '',
			}
		},
		onLoad(e) {
			this.type = e.type
			if (this.type == 2) {
				uni.setNavigationBarTitle({
					title: '注册协议'
				});
			} else if (this.type == 3) {
				uni.setNavigationBarTitle({
					title: '隐私协议'
				});
			} else if (this.type == 4) {
				uni.setNavigationBarTitle({
					title: '借款协议'
				});
			}
			this.info()
		},
		methods: {
			info() {
				word({
					id: this.type
				}).then(res => {
					this.contentNodes = res.data.content
					console.log(res);
				})
			}
		},
		onPageScroll(e) {},
	}
</script>

<style scoped lang="scss">
	.content {
		margin: 40rpx 30rpx;
		font-size: 26rpx;
	}
</style>